//============================================================================
// Name        : adapter_pattern.cpp
// Author      : Tony
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;
class Adaptee
{
public:
	void specificRequest()
	{
		cout<<"adaptee specific request"<<endl;
	}
};

class Adapter
{
public:
	Adapter(Adaptee* adaptee)
	{
		_adaptee = adaptee;
	}

	void request()
	{
		cout<<"adapter request"<<endl;
		_adaptee->specificRequest();
	}

private:
	Adaptee* _adaptee;
};

int main() {
	Adaptee* adaptee = new Adaptee();
	Adapter* adapter = new Adapter(adaptee);
	adapter->request();
	delete adaptee;
	delete adapter;
	return 0;
}
